package com.qf.utils;

import com.qf.exception.AppException;
import com.qf.vo.ResultVo;

public class ResultVoUtil {
    public static ResultVo success(Object data){
        return new ResultVo(0,"成功" , data);
    }

    public static ResultVo success(){
        return ResultVoUtil.success(null);
    }

    public static ResultVo error(AppException ex){

        return new ResultVo(ex.getCode(), ex.getMessage(),null );
    }
}
